package com.sunny;

import ch.qos.logback.core.joran.conditional.Condition;
import com.sunny.custom.annotation.ImportTest;
import com.sunny.custom.annotation.SpringBootApplication;
import com.sunny.entity.User;
import org.springframework.boot.SpringApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;

@SpringBootApplication
@ImportTest(value = "value" , name = "Spring boot Import")
@ComponentScan
public class Application {

    @Bean
    public User getUser(){
        return new User();
    }

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(Application.class);
        System.out.println(context.getBean(User.class));
        context.close();
    }
}
